#pragma once
#include "vec2.h"

namespace mray{
	vec2::vec2(float x , float y){
		this->x = x;
		this->y = y;
	}
	vec2::vec2(const vec2& v){
		this->x = v.x;
		this->y = v.y;
	}
	vec2& vec2::operator = (const vec2& v){
		this->x = v.x;
		this->y = v.y;
		return *this;
	}
	vec2& vec2::operator*=(float f){
		this->x *= f;
		this->y *= f;
		return *this;
	}

	mray::vec2 vec2::operator*(float f)const
	{
		return vec2(x*f, y*f);
	}

	vec2& vec2::operator+=(const vec2& v)
	{
		x += v.x;
		y += v.y;
		return *this;
	}

	vec2& vec2::operator-=(const vec2& v)
	{
		x -= v.x;
		y -= v.y;
		return *this;
	}
}